﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace HcyWpfApp1.View
{
    /// <summary>
    /// TestPoint.xaml 的交互逻辑
    /// </summary>
    public partial class TestPoint : Window
    {
        public TestPoint()
        {
            InitializeComponent();
            DrawPolygon();
        }

        private void DrawPolygon()
        {
            //var polygon = TestPointUtils.GetPolygon(TestPointUtils.GetPoints());
            //myCanvas.Children.Add(polygon);

            //var polygon2 = TestPointUtils.GetPolygon(TestPointUtils.GetPoints2(TestPointUtils.GetPoints()));
            //myCanvas.Children.Add(polygon2);

            //var line1 = TestPointUtils.GetLine1();
            //myCanvas.Children.Add(line1);

            //var line2 = TestPointUtils.GetLine2();
            //myCanvas.Children.Add(line2);

            //var line3 = TestPointUtils.GetLine3();
            //myCanvas.Children.Add(line3);

            //var line4 = TestPointUtils.GetLine4();
            //myCanvas.Children.Add(line4);

            var testUtils=new TestPointUtils();
            testUtils.Length = 150;
            testUtils.Width = 20;
            testUtils.Height = 150;
            var polygons = testUtils.GetPolygons(new Point(100,100));
            foreach (var item in polygons)
            {
                myCanvas.Children.Add(item);
            }
        }
    }
}
